package mapper;

import domain.Brand;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface BrandMapper2 {
    @Select("select * from tb_brand")
    List<Brand> selectAllBrand();

    @Insert("insert into tb_brand (brand_name,company_name,ordered,description,status) values (#{brandName},#{companyName},#{ordered},#{description},#{status})")
    int insertBrand(Brand brand);

    @Update("update tb_brand set brand_name=#{brandName},company_name=#{companyName},ordered=#{ordered},description=#{description},status=#{status}")
    int updateBrand(Brand brand);
}
